package org.bing.engine.common.process;

import java.io.FileOutputStream;
import java.io.PrintStream;

public class DemoMain {

    /**
     * @param args
     * @throws InterruptedException
     */
    public static void main(String[] args) throws Exception {
        PrintStream out = new PrintStream(new FileOutputStream("E:\\log.log"));
        System.setOut(out);
        System.setErr(out);
        int i = 0;
        while (true) {
            ++i;
            System.out.println(i + " > O Hello " + System.currentTimeMillis());
            System.err.println(i + " > E Hello " + System.currentTimeMillis());
            Thread.sleep(500);
            out.println(i + " Helo" + System.currentTimeMillis());
        }

    }
}
